package com.magicmovie.service;

import com.magicmovie.entity.Banner;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
public interface BannerService {
    /**
     * 所有上线轮播
     *
     * @return
     */
    @RequestMapping(value = "/banner/list", method = RequestMethod.GET)
    List<Banner> findAll();

    @RequestMapping(value = "/banner/queryObject", method = RequestMethod.GET)
    Banner queryObject(@RequestParam(value = "id") Integer id);

    @RequestMapping(value = "/banner/queryList", method = RequestMethod.POST)
    List<Banner> queryList(@RequestBody Map<String, Object> map);

    @RequestMapping(value = "/banner/save", method = RequestMethod.POST)
    void save(@RequestBody Banner banner);

    @RequestMapping(value = "/banner/update", method = RequestMethod.POST)
    void update(@RequestBody Banner banner);

    @RequestMapping(value = "/banner/delete", method = RequestMethod.POST)
    void delete(@RequestParam("id") Integer id);
}
